package com.androidx.p013lv.base.view;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.androidx.p013lv.base.C1010R;

/* renamed from: com.androidx.lv.base.view.CustomToast */
public class CustomToast {
    public static final int CORRECT = 3;
    public static final int SIGH = 1;
    public static final int WEAK = 0;
    public static final int WRONG = 2;

    public CustomToast(Context context, String str, int i) {
        Toast toast = new Toast(context);
        toast.setDuration(0);
        View inflate = View.inflate(context, C1010R.C1015layout.base_toast_custom, null);
        TextView textView = (TextView) inflate.findViewById(C1010R.C1013id.text_content);
        ImageView imageView = (ImageView) inflate.findViewById(C1010R.C1013id.toast_img);
        if (i == 0) {
            imageView.setImageResource(C1010R.C1012drawable.base_ic_toast_weak);
        } else if (i == 1) {
            imageView.setImageResource(C1010R.C1012drawable.base_ic_toast_sigh);
        } else if (i != 2) {
            imageView.setImageResource(C1010R.C1012drawable.base_ic_toast_correct);
        } else {
            imageView.setImageResource(C1010R.C1012drawable.base_ic_toast_wrong);
        }
        textView.setText(str);
        toast.setView(inflate);
        toast.setGravity(17, 0, 0);
        toast.show();
    }
}
